<template>
    <div id="bre">
        <el-breadcrumb separator-class="el-icon-arrow-right">
            <el-breadcrumb-item :to="{ path: '/' }" v-for="(v,i) in list " :key="i">
                <router-link :to="v.path">
                    {{ v.meta.title }}
                </router-link>

        </el-breadcrumb-item>
        </el-breadcrumb>
    </div>
</template>
<script>
export default{
    data(){
        return{
            list:[]
        }
    },
    created(){
        this.list = this.$route.matched;
        console.log(this.$route.matched);
    },
    watch:{ //监听
        $route(to, from) {
            this.list = to.matched;
        }
    }

}

</script>